<template>
  <div :class="mark ? '' : 'detail'">
    <div class="content">
      <span
        class="icon iconfont icondengdai status1"
        v-if="status === 1"
      ></span>
      <span
        class="icon iconfont iconyiqueren status2"
        v-if="status === 2"
      ></span>
      <span
        class="icon iconfont iconshibai1 status3"
        v-if="status === 3"
      ></span>
      <div class="info">
        <p
          v-if="mark"
          :class="
            status === 1
              ? 'status1 statusCheck'
              : status === 2
              ? 'status2'
              : 'status3'
          "
        >
          {{ statusDesc || '--' }}
        </p>
        <p
          v-else
          :class="
            status === 1
              ? 'status1 statusCheck'
              : status === 2
              ? 'status2'
              : 'status3'
          "
        >
          {{
            status === 1 ? '待审核' : status === 2 ? '审核通过' : '审核不通过'
          }}
        </p>
        <p class="infoItems" v-if="status !== 1">
          <span v-for="(item, index) in infoList" :key="index"
            >{{ `${item.title}：${item.value || '--'}` }}
            <i v-if="index < infoList.length - 1"></i
          ></span>
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    status: {
      type: Number,
      default: 1,
    },
    infoList: {
      type: Array,
    },
    mark: {
      type: String,
    },
    statusDesc: {
      type: String,
    },
  },
}
</script>

<style lang="less" scoped>
.detail {
  padding: 20px 24px;
  border-bottom: 10px solid #f5f7fa;
}
.content {
  background: #f8f9fb;
  padding: 16px 24px 16px 76px;
  position: relative;
  height: 74px;
}
.info {
  display: inline-block;
  height: 42px;
  line-height: 42px;
  p {
    line-height: 18px;
    font-size: 18px;
  }
  .statusCheck {
    line-height: 42px;
  }
  .infoItems {
    color: #333333;
    margin-top: 10px;
    line-height: 14px;
    font-size: 14px;
    i {
      display: inline-block;
      vertical-align: bottom;
      width: 0px;
      height: 14px;
      border: 1px solid #dbdbdb;
      margin: 0 20px;
    }
  }
}
.iconfont {
  position: absolute;
  top: 19px;
  left: 24px;
  display: inline-block;
  font-size: 36px;
  margin-right: 16px;
}
.status1 {
  color: #ffac37;
}
.status2 {
  color: #06ac15;
}
.status3 {
  color: #e31c12;
}
</style>
